<?php
/**
 * Created by Shijie Liu. 2017/6/21
 *
 */

    include ("DB_util.php");
    $db = new DB_util();

    $book_id = $_GET["id"];
    $use_id = $_COOKIE["user_login"];

//    $use_id = "15905517340";
//    $book_id = 1106;

    $sql = "delete  from book_cart  where book_id = $book_id AND user_id = $use_id";

    $state = $db->queryDB($sql);
    if ($state != false){
        echo 1;  //删除成功
    }else{
        echo 0;  //删除失败
    }